4573863bc09b4fbd734eb7e3fbaeaf5f7f66ac13,app/src/main/java/com/boardgamegeek/service/SyncPlays.java,SyncPlays,execute,#Account#SyncResult#,40
Before Change
long oldestDate = Authenticator.getLong(context, SyncService.TIMESTAMP_PLAYS_OLDEST_DATE, Long.MAX_VALUE);
if (oldestDate > 0) {
String date = DateTimeUtils.formatDateForApi(oldestDate);
int page = 1;
do {
response = executeCall(account.name, null, date, page);
if (isCancelled()) {
Timber.i("...cancelled early");
return;
}
page++;
} while (response != null && response.hasMorePages());
deleteUnupdatedPlaysBefore(oldestDate);
Authenticator.putLong(context, SyncService.TIMESTAMP_PLAYS_OLDEST_DATE, 0);
}
After Change
long oldestDate = Authenticator.getLong(context, SyncService.TIMESTAMP_PLAYS_OLDEST_DATE, Long.MAX_VALUE);
if (oldestDate > 0) {
String date = DateTimeUtils.formatDateForApi(oldestDate);
if (executeCall(account.name, null, date)) return;
deleteUnupdatedPlaysBefore(oldestDate);
Authenticator.putLong(context, SyncService.TIMESTAMP_PLAYS_OLDEST_DATE, 0);
}
SyncService.hIndex(context);